package com.yxx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxx.entity.Tag;
import com.yxx.entityModel.vo.query.TagQuery;
import com.yxx.entityModel.vo.response.TagBackResponse;
import com.yxx.entityModel.vo.response.TagOptionResponse;
import com.yxx.entityModel.vo.response.TagResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author yuxiangxun
 * @date 2025/1/24
 * @apiNote
 */
@Repository
public interface TagMapper extends BaseMapper<Tag> {

    /**
     * 查询标签选项列表
     * @return
     */
    List<TagOptionResponse> selectTagOptionList();

    /**
     * 查询后台标签列表
     * @param tagQuery
     * @return
     */
    List<TagBackResponse> selectTagBackList(@Param("param") TagQuery tagQuery);

    /**
     * 查询文章标签列表
     * @return
     */
    List<TagResponse> selectTagListVO();

    /**
     * 根据文章id查询文章标签名称
     * @param articleId 文章id
     * @return 文章标签名称
     */
    List<String> selectTagNameByArticleId(@Param("articleId") Integer articleId);
}
